<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="Description" content="Site d'ench&egrave;res, payez les objets dont vous avez toujours r&eacute;v&eacute; &agrave; moindre prix!" />
        <meta name="Keywords" content="enchere, site d'enchere, meilleur prix" />
        <meta http-equiv="Content-Language" content="fr" />
        <meta name="robots" content="index,follow" />

        <link rel="stylesheet" href="<?php echo _BASE_URI_;?>css/frontend.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="<?php echo _BASE_URI_;?>css/default.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="<?php echo _BASE_URI_;?>css/nivo-slider.css" type="text/css" media="screen" />
        <title><?php if (!isset($title)) { echo _WELCOME_ ;} else { echo $title; }?></title>
    </head>
    <body>
	<div id="global">
	
	<div id="container">
		<a href="<?php echo _BASE_URI_;?>" class="logo"><div id="logo"></div></a>
        <div id="header">
            <?php
                list($hour, $minu, $second) = explode(':',$site->getHourOpen());
                list($hourf, $minuf, $secondf) = explode(':',$site->getHourClose());
            ?>
            <div id="houropen"><?php echo _OUVERTURE_ .$hour.'h '._A_.$hourf.'h';?></div>
		<?php
		if(!$user->isAuthenticated()){
            echo '<div id="inscription"><a href="'._BASE_URI_.'create-user.html">INSCRIVEZ-VOUS MAINTENANT!</a></div>';
        }else {
            $tools = new \Library\Tools;
			echo '
            <div id="connected">
                Bienvenue ' . $user->getPseudo() . ', vous disposez de <span id="nber_cdt">' . $user->getCredits() . '</span> cr&eacute;dit' . $tools->pluriel($user->getCredits()) . '.<br />
                Bonnes ench&egrave;res &agrave; vous!
            </div>';
		
		}
		?>
        </div>
        <div class="social_rx">
            <a href="http://www.facebook.com/#!/pages/KristoClic/133800696666922" target="_blank"><div id="fb-icon"></div></a>
            <a href="http://twitter.com/kristoclic" target="_blank"><div id="tw-icon"></div></a>
        </div>
        <div class="clear"></div>
		<div id="contenu">
			<?php
            
				echo '
				<div id="menu">
					<ul>
						<li'; if( preg_match('#index.html#', $link->requestURI())) echo ' class="active"'; echo '><a href="'._BASE_URI_.'index.html">'._HOME_.'</a></li>
						<li'; if( preg_match('/encheres-a-venir.html/i', $link->requestURI())) echo ' class="active"'; echo '><a href="'._BASE_URI_.'encheres-a-venir.html">Ench&egrave;res &agrave; venir</a></li>
						<li'; if( preg_match('/encheres-terminees.html/i', $link->requestURI())) echo ' class="active"'; echo '><a href="'._BASE_URI_.'encheres-terminees.html">Ench&egrave;res termin&eacute;es</a></li>
						<li'; if( preg_match('/achat-de-credits.html/i', $link->requestURI())) echo ' class="active"'; echo '><a href="'._BASE_URI_.'achat-de-credits.html">Achat de cr&eacute;dits</a></li>
						<li'; if( preg_match('/faq.html/i', $link->requestURI())) echo ' class="active"'; echo '><a href="'._BASE_URI_.'faq.html">'._FAQ_.'</a></li>
						<li'; if( preg_match('/contact.html/i', $link->requestURI())) echo ' class="active"'; echo'><a href="'._BASE_URI_.'contact.html">'._CONTACT_.'</a></li>
					</ul>
				</div>';
			?>
			<div id="out-menu"></div>				
				<div id="page" class="columns number-column<?php echo $nbrcolumn ?>">
					<div id="wapper-content">
					<?php
						echo $content;
					?>
					</div>
				</div>
				<?php if($nbrcolumn!=1): ?>
				<div id="right-page">
					<div id="paiement"></div>
					<?php
					if( $user->isAuthenticated() ) {
						echo '
						<div id="mon-compte">
							<ul>
								<li>- <a href="'._BASE_URI_.'update-user'.$user->getId().'.html">Mon compte</a></li>
								<li>- <a href="'._BASE_URI_.'mes-encheres-en-cours.html">Mes ench&egrave;res en cours</a></li>
								<li>- <a href="'._BASE_URI_.'mes-auto-encheres.html">Mes auto ench&egrave;res</a></li>
								<li>- <a href="'._BASE_URI_.'mes-produits-gagnes.html">Mes produits gagn&eacute;s</a></li>
								<li>- <a href="'._BASE_URI_.'mes-credits.html">Mes cr&eacute;dits</a></li>
								<li>- <a href="'._BASE_URI_.'logout.html">D&eacute;connexion</a></li>
							</ul>
						</div>';
					} else {
						echo '
						<div id="connexion">
							<form method="post" action="'._BASE_URI_.'login2.html">
								<input type="text" name="id_pseudo" class="pseudo" value="Identifiant" onfocus="if( this.value = \'Identifiant\' ) { this.value =\'\'; }" />
								<input type="password" name="id_password" class="password" value="********" onfocus="if( this.value = \'********\' ) { this.value =\'\'; }" />
                                <input type="submit"value="" style="vertical-align:middle;" class="btn-login" /><br />
								<div class="reg">Se souvenir de moi <input type="checkbox" name="reg" /></div>
								<div class="lost"><a href="">Mot de passe oubli&eacute;?</a></div>
							</form>
					  </div>';
					}	
					?>				
					<div id="fonctionnement">
						<div id="explications">
							1<br />
							Je m'inscris (Gratuit)<br /><br />
							2<br />
							J'ach&egrave;te des cr&eacute;dits<br /><br />
							3<br />
							J'ench&eacute;ris d'un centime<br />
							(1 cr&eacute;dit)<br /><br />
							4<br />
							J'attends la fin du<br />
							compteur, si personne<br />
							n'a surench&egrave;rie,<br /><br />
							<span class="redwin">JE GAGNE</span>
							<div id="contact"><img src="<?php echo _BASE_URI_;?>images/contact.png" usemap="#ctc"></div>
							<map id="ctc" name="ctc"><area shape="poly" alt="" title="" coords="25,1,2,22,24,43,162,43,162,51,187,42,188,1,165,1,84,1,26,1,25,2" href="<?php echo _BASE_URI_;?>contact.html" target="_self" /></map>
						</div>
					</div>
				</div>
            <?php endif; ?>
			<div id="publicite">
            <?php if(isset($adversliste)): ?>
                <div class="slider-wrapper theme-default">
                    <div id="slider" class="nivoSlider">
                        <?php foreach ($adversliste as $advers):?>
                        <a href="<?php echo $advers->getLien() ?>" title="">
                            <img style="margin-left:8px;" alt="" src="<?php echo _UPLOAD_DIR_.'banner/'.$advers->getImage() ?>"/>
                        </a>
                        <?php endforeach;?>
                    </div>
                </div>
            <?php  endif; ?>
            </div>
            <div class="clear"></div>
        </div></div>
        <div id="footer">
            <ul>
                <li><a href="<?php echo _BASE_URI_;?>index.html">Accueil</a></li> - 
                <li><a href="<?php echo _BASE_URI_;?>cms-1.html">Qui sommes-nous?</a></li> - 
                <li><a href="<?php echo _BASE_URI_;?>cms-2.html">CGU</a></li> - 
                <li><a href="<?php echo _BASE_URI_;?>faq.html">F.A.Q</a></li> - 
                <li><a href="<?php echo _BASE_URI_;?>contact.html">Contact</a></li>
            </ul><br />
            <span>Copyright 2009 - <?php echo date('Y'); ?> &copy; Tous droits r&eacute;serv&eacute;s.</span>

        <div class="clear"></div>
        </div>
        <!-- chargement des différentes libraireis javascript -->
        <script src="<?php echo _BASE_URI_;?>js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="<?php echo _BASE_URI_;?>js/jquery-ui.min.js" type="text/javascript"></script>
        <script src="<?php echo _BASE_URI_;?>js/jquery.nivo.slider.js" type="text/javascript"></script>
        <script src="<?php echo _BASE_URI_;?>js/otherjs.js" type="text/javascript"></script>
        <script src="<?php echo _BASE_URI_;?>js/manageEncheres.js" type="text/javascript"></script>
    </body>
</html>
